<template>
    <van-dialog v-model:show="showSwiper" title="标题">
      <component :is="currentComponent"></component>
    </van-dialog>
</template>
<script setup name="swipeVerify">
import {reactive,markRaw} from "vue";
import Common from "@/components/swipeVerify/common/index.vue"
import WordClick from "@/components/swipeVerify/wordClick/index.vue"
const props = defineProps({
  showSwiper: {
    type: Boolean,
    default: false
  },
  tip :{
    type: String,
    default: "拖动滑块完成拼图(slider&concat)" || "拖动滑块旋转正确位置(rotate)"
  }
})
let tabList = reactive([
  {name:'Common',com:markRaw(Common)},
  {name:'WordClick',com:markRaw(WordClick)}
]);
let currentComponent = reactive({
  com:tabList[0].com,
  name:tabList[0].name
});
const change = ( idx )=>{
  currentComponent.com = tabList[idx].com;
  currentComponent.name = tabList[idx].name;
}
// 关闭滑块验证
function handleClose(){
  props.showSwiper.value = false;
}
</script>
<style scoped>
</style>
